﻿using System;
using Plugins.UserControls;
using Utils;

namespace Plugins.Base.Common
{
    [Serializable]
	public class CommonSettingsBase : ICopyable<CommonSettingsBase>, ICloneable<CommonSettingsBase>
    {
		#region Properties

		public StockParametersSelectorData StockParameters { get; private set; }
		public HourSelectorData HourOptions { get; private set; }
		public StockSelectorData StockSelectionOptions { get; private set; }

		#endregion

		#region Public Methods

		public CommonSettingsBase(HourSelectorData hourOptions, StockSelectorData stockSelectionOptions, StockParametersSelectorData stockParameters)
		{
			this.HourOptions = hourOptions;
			this.StockSelectionOptions = stockSelectionOptions;
			this.StockParameters = stockParameters;
		}

		#endregion

		#region ICopyable

		public void Copy(CommonSettingsBase source)
		{
			this.HourOptions.Copy(source.HourOptions);
			this.StockSelectionOptions.Copy(source.StockSelectionOptions);
			this.StockParameters.Copy(source.StockParameters);
		}

		#endregion

		#region ICloneable

		public CommonSettingsBase Clone()
		{
			return new CommonSettingsBase(this.HourOptions.Clone(), this.StockSelectionOptions.Clone(), this.StockParameters.Clone());
		}

		#endregion
	}
}

